home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
bbs
/
mhis020.zip
/
CALLSTAT.MH
< prev
next >
Wrap
Text File
|
1996-12-21
|
2KB
|
61 lines
#ifndef __CALLSTAT_MH
#define __CALLSTAT_MH
#ifndef __CALLINFO_MH
#include "callinfo.mh"
#endif
#ifndef __CALLCRIT_MH
#include "callcrit.mh"
#endif
#ifndef __DATE_MH
#include "date.mh"
#endif
#ifndef __FLOAT_MH
#include "float.mh"
#endif
struct _callstats {
unsigned int: calls;
unsigned long: time;
unsigned int: filesup;
unsigned int: filesdn;
unsigned int: read;
unsigned int: posted;
unsigned long: kbup;
unsigned long: kbdn;
unsigned int: paged;
unsigned int: days;
};
void stats_add (Ref struct _callstats: stats, Ref struct _callinfo: ci) {
stats.calls := stats.calls + 1;
stats.kbup := stats.kbup + ci.kbup;
stats.kbdn := stats.kbdn + ci.kbdn;
stats.filesup := stats.filesup + ci.filesup;
stats.filesdn := stats.filesdn + ci.filesdn;
stats.read := stats.read + ci.read;
stats.posted := stats.posted + ci.posted;
stats.paged := stats.paged + ci.paged;
stats.time := stats.time + time_online (ci);
}
void stats_clear (Ref struct _callstats: stats) {
stats.calls := 0;
stats.kbup := 0;
stats.kbdn := 0;
stats.filesup := 0;
stats.filesdn := 0;
stats.read := 0;
stats.posted := 0;
stats.paged := 0;
stats.time := 0;
stats.days := 0;
}
#endif